
#ifndef __FUNCTION_CHART_H_
#define __FUNCTION_CHART_H_

#include <vtkVersion.h>
#include <vtkRenderer.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkRenderWindow.h>
#include <vtkSmartPointer.h>
#include <vtkChartXY.h>
#include <vtkTable.h>
#include <vtkPlot.h>
#include <vtkFloatArray.h>
#include <vtkContextView.h>
#include <vtkContextScene.h>
#include <vtkPen.h>
#include <vector>
#include "Chart.h"


using namespace std;


class FunctionChart : public Chart
{
	protected:

		vector<double (*) (double*, void*)> _functions;
		vector<void*> _extra_data;

		void _store_function(double (*function) (double *data, void *additional_data), void *additional_data);
		void _add_function_field();

	public:

		FunctionChart(int dim, double **limits, int num_slices = 500);
		virtual ~FunctionChart();

		void AddFunction(double (*function) (double *data, void *additional_data), void *additional_data);
		virtual vtkSmartPointer<vtkChartXY> BuildChart();
};

#endif
